/*
 * pruebaGridPane.java
 *
 * Created on 31 de enero de 2007, 10:29 AM
 */

package inc.jmc.cyberboard.ztrashcan;

/**
 *
 * @author  JOlguin01
 */
public class pruebaGridPane extends java.awt.Frame {
    
    /** Creates new form pruebaGridPane */
    public pruebaGridPane() {
        initComponents();
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();

        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                exitForm(evt);
            }
        });

        jPanel1.setLayout(new java.awt.GridLayout(0, 3, 10, 10));

        jLabel1.setText("jLabel1");
        jPanel1.add(jLabel1);

        jTextField1.setForeground(new java.awt.Color(51, 0, 255));
        jTextField1.setText("jTextField1");
        jTextField1.setSelectionColor(new java.awt.Color(255, 255, 0));
        jTextField1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField1ActionPerformed(evt);
            }
        });
        jTextField1.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                jTextField1FocusGained(evt);
            }
        });

        jPanel1.add(jTextField1);

        jLabel2.setText("jLabel2");
        jPanel1.add(jLabel2);

        jLabel3.setText("jLabel3");
        jPanel1.add(jLabel3);

        jLabel4.setText("jLabel4");
        jPanel1.add(jLabel4);

        jLabel5.setText("jLabel5");
        jPanel1.add(jLabel5);

        add(jPanel1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTextField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusGained

        jTextField1.selectAll();
    }//GEN-LAST:event_jTextField1FocusGained

    private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed

        jTextField1.selectAll();
    }//GEN-LAST:event_jTextField1ActionPerformed
    
    /** Exit the Application */
    private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
        System.exit(0);
    }//GEN-LAST:event_exitForm
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new pruebaGridPane().setVisible(true);
            }
        });
    }
    /*
    void handlePage0() throws SQLException {
		String s, q = getParameter("queue"),
			queue[] = { "WB300", "WB316", "HH15", "HH16", "25SJ9", "29SJ9" },
//			cmd[] = { "/usr/local/sbin/.suid", "/usr/local/sbin/lpflush", q };
//			cmd[] = { "/usr/local/sbin/.suid", "/usr/bin/lprm", "-", "-P"+q };
			// 20031017 Modified parameters for LPRng
			cmd_flush[] = { "/usr/local/sbin/.suid", "/usr/bin/lprm", "-P"+q, "all" };
		Lib.writeLog(Logfile, Username, (q==null) ? "Flush opened" : "Flush: " + q);
		PrintWriter out = getServletWriter();
		out.println(htmlStandardHeader("Flush Printer Queues") +
			"<p>Use this page to remove all jobs from a departmental printer queue.</p>\n" +
			"<p>Corrupted print jobs in a queue can sometimes cause a printer to pause printing" +
			 " for very long periods and the only option to get things moving" +
			 " is to remove all jobs from the queue.</p>\n" +
			"<form name=LpdKick method=post action=\"/dept/MCSDB.LpdKick\">\n" + getHiddenAuth(0) +
//			"<p>Try this when <a href=\"MCSDB.LpdKick\" onClick=\"submit();return false\"><u>restarting</u></a>" +
			"<p>Try this if <a href=\"javascript:document.LpdKick.submit()\"><u>restarting</u></a>" +
			 " the print server fails to restart an inactive printer.</p>\n" +
//			"</form><hr size=1>\n" +
//			((q==null) ? "" : "<p><tt>Flushed printer queue " + q.toUpperCase() + "</tt></p><hr size=1>\n") +
			"</form><hr size=1>");
		// Flush the selected queue
		if (q!=null) {
			out.println("<tt>");
			try {
				InputStream in = Runtime.getRuntime().exec(cmd_flush).getInputStream();
				while ((s = Lib.readLine(in))!=null) out.println(s + "<br>");
			} catch (IOException e) {}
			out.println("Flushed queue " + q.toUpperCase() + "</tt><hr size=1>");
		}
		out.println(
			"<p>Select a printer queue and then click on the '<i>Flush</i>' button.</p>\n" +
			"<form method=post>\n" + getHiddenAuth(0) +
			"<table cellspacing=8>");
		// Queue selector
		for (int i=0; i<queue.length; ++i)
			out.println(
				(((i&1)!=0)?"":"<tr>") +
				"<td><input type=radio name=queue value=" + queue[i].toLowerCase() + ">" + queue[i] + "</td>" +
				(((i&1)==0)?"":"</tr>"));
		out.println("</table><p><input type=submit value=Flush></p></form></body></html>");
		out.flush();
	}*/

    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JTextField jTextField1;
    // End of variables declaration//GEN-END:variables
    
}
